/*
 * Copyright 2018 JDCLOUD.COM
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *    http:#www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *
 * Cloud Cabinet Service API
 * 提供云托管服务的相关接口
 *
 * OpenAPI spec version: v1
 * Contact: 
 *
 * NOTE: This class is auto generated by the jdcloud code generator program.
 */


using JDCloudSDK.Core.Auth;
using JDCloudSDK.Core.Client;
using JDCloudSDK.Core.Http;
using JDCloudSDK.Jdccs.Apis;
using JDCloudSDK.Jdccs.Model;
using System;
using System.Collections.Generic;
using System.Text;
#if NET40||NET35
#else
using System.Threading.Tasks;
#endif

namespace JDCloudSDK.Jdccs.Client
{
    /// <summary>
    ///  Cloud Cabinet Service API
    ///  提供云托管服务的相关接口
    ///  Jdccs Api 客户端
    ///</summary>
    public class JdccsClient : JdcloudClient
    {

        /// <summary>
        ///  默认私有构造函数
        /// </summary>
        private JdccsClient()
        {

        }

        /// <summary>
        /// 默认构造函数
        /// </summary>
        /// <param name="credentialsProvider">认证信息</param>
        /// <param name="httpRequestConfig">http 客户端配置信息</param>
        /// <param name="environment">sdk 环境配置信息</param>
        public JdccsClient(CredentialsProvider credentialsProvider, HttpRequestConfig httpRequestConfig,SDKEnvironment environment)
        {
            this.httpRequestConfig = httpRequestConfig;
            this.credentialsProvider = credentialsProvider;
            this.environment = environment;
        }

        /// <summary>
        /// 默认构造函数
        /// </summary>
        /// <param name="httpRequestConfig">http 客户端配置信息</param>
        /// <param name="credentialsProvider">认证信息</param>
        public JdccsClient(CredentialsProvider credentialsProvider,HttpRequestConfig httpRequestConfig)
        {
            this.httpRequestConfig = httpRequestConfig;
            this.credentialsProvider = credentialsProvider;
        }

        /// <summary>
        /// 默认构造函数，
        /// 注意如果使用此方法 httpRequestConfig 使用的http 请求 schema 为Https
        /// </summary>
        /// <param name="credentialsProvider">认证信息</param>
        public JdccsClient(CredentialsProvider credentialsProvider)
        {
            this.credentialsProvider = credentialsProvider;
        }

        /// <summary>
        ///  版本号 1.2.3
        ///</summary>
        public const string ClientVersion = "1.2.3";

        private const string apiVersion = "v1";
        private const string userAgentPrefix = "JdcloudSdkDotNet";
        private const string defaultEndpoint = "jdccs.jdcloud-api.com";
        private const string serviceName = "jdccs";
        private const string userAgent = userAgentPrefix + "/" + ClientVersion + " " + serviceName + "/" + apiVersion;


        private SDKEnvironment environment = new SDKEnvironment(defaultEndpoint);
        private CredentialsProvider credentialsProvider;
        private HttpRequestConfig httpRequestConfig;

        /// <summary>
        ///  获取证书信息
        ///</summary>
        public override CredentialsProvider CredentialsProvider   { get { return credentialsProvider; } }

        /// <summary>
        ///  获取http 客户端配置信息
        ///</summary>
        public override HttpRequestConfig HttpRequestConfig { get { return httpRequestConfig; } }

        /// <summary>
        ///  获取sdk环境配置信息
        ///</summary>
        public override SDKEnvironment SDKEnvironment { get { return environment; } }

        /// <summary>
        ///  获取用户自定义浏览器识别字符串
        ///</summary>
        public override string UserAgent { get { return userAgent; } }

        /// <summary>
        ///  获取服务名称
        ///</summary>
        public override string ServiceName { get { return serviceName; } }

        /// <summary>
        ///  获取版本号
        ///</summary>
        public override string Version { get { return apiVersion; } }



#if NET40||NET35
        /// <summary>
        ///  创建报警
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public CreateAlarmResponse CreateAlarm(CreateAlarmRequest request) {
            return  new CreateAlarmExecutor().Client(this).Execute<CreateAlarmResponse, CreateAlarmResult, CreateAlarmRequest>(request);
        }
#else
        /// <summary>
        ///  创建报警
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<CreateAlarmResponse> CreateAlarm(CreateAlarmRequest request) {
            return await new CreateAlarmExecutor().Client(this).Execute<CreateAlarmResponse, CreateAlarmResult, CreateAlarmRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  查询工单列表
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public DescribeTicketsResponse DescribeTickets(DescribeTicketsRequest request) {
            return  new DescribeTicketsExecutor().Client(this).Execute<DescribeTicketsResponse, DescribeTicketsResult, DescribeTicketsRequest>(request);
        }
#else
        /// <summary>
        ///  查询工单列表
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<DescribeTicketsResponse> DescribeTickets(DescribeTicketsRequest request) {
            return await new DescribeTicketsExecutor().Client(this).Execute<DescribeTicketsResponse, DescribeTicketsResult, DescribeTicketsRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  报警历史列表
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public DescribeAlarmHistoryResponse DescribeAlarmHistory(DescribeAlarmHistoryRequest request) {
            return  new DescribeAlarmHistoryExecutor().Client(this).Execute<DescribeAlarmHistoryResponse, DescribeAlarmHistoryResult, DescribeAlarmHistoryRequest>(request);
        }
#else
        /// <summary>
        ///  报警历史列表
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<DescribeAlarmHistoryResponse> DescribeAlarmHistory(DescribeAlarmHistoryRequest request) {
            return await new DescribeAlarmHistoryExecutor().Client(this).Execute<DescribeAlarmHistoryResponse, DescribeAlarmHistoryResult, DescribeAlarmHistoryRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  查询IDC机房列表
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public DescribeIdcsResponse DescribeIdcs(DescribeIdcsRequest request) {
            return  new DescribeIdcsExecutor().Client(this).Execute<DescribeIdcsResponse, DescribeIdcsResult, DescribeIdcsRequest>(request);
        }
#else
        /// <summary>
        ///  查询IDC机房列表
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<DescribeIdcsResponse> DescribeIdcs(DescribeIdcsRequest request) {
            return await new DescribeIdcsExecutor().Client(this).Execute<DescribeIdcsResponse, DescribeIdcsResult, DescribeIdcsRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  启用、禁用报警
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public SwitchAlarmResponse SwitchAlarm(SwitchAlarmRequest request) {
            return  new SwitchAlarmExecutor().Client(this).Execute<SwitchAlarmResponse, SwitchAlarmResult, SwitchAlarmRequest>(request);
        }
#else
        /// <summary>
        ///  启用、禁用报警
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<SwitchAlarmResponse> SwitchAlarm(SwitchAlarmRequest request) {
            return await new SwitchAlarmExecutor().Client(this).Execute<SwitchAlarmResponse, SwitchAlarmResult, SwitchAlarmRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  查询开放设备数据信息接口
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public DescribeOpenDevicesDataResponse DescribeOpenDevicesData(DescribeOpenDevicesDataRequest request) {
            return  new DescribeOpenDevicesDataExecutor().Client(this).Execute<DescribeOpenDevicesDataResponse, DescribeOpenDevicesDataResult, DescribeOpenDevicesDataRequest>(request);
        }
#else
        /// <summary>
        ///  查询开放设备数据信息接口
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<DescribeOpenDevicesDataResponse> DescribeOpenDevicesData(DescribeOpenDevicesDataRequest request) {
            return await new DescribeOpenDevicesDataExecutor().Client(this).Execute<DescribeOpenDevicesDataResponse, DescribeOpenDevicesDataResult, DescribeOpenDevicesDataRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  查询带宽（出口）详情
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public DescribeBandwidthResponse DescribeBandwidth(DescribeBandwidthRequest request) {
            return  new DescribeBandwidthExecutor().Client(this).Execute<DescribeBandwidthResponse, DescribeBandwidthResult, DescribeBandwidthRequest>(request);
        }
#else
        /// <summary>
        ///  查询带宽（出口）详情
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<DescribeBandwidthResponse> DescribeBandwidth(DescribeBandwidthRequest request) {
            return await new DescribeBandwidthExecutor().Client(this).Execute<DescribeBandwidthResponse, DescribeBandwidthResult, DescribeBandwidthRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  提交通用服务工单
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public CreateGeneralServicesTicketResponse CreateGeneralServicesTicket(CreateGeneralServicesTicketRequest request) {
            return  new CreateGeneralServicesTicketExecutor().Client(this).Execute<CreateGeneralServicesTicketResponse, CreateGeneralServicesTicketResult, CreateGeneralServicesTicketRequest>(request);
        }
#else
        /// <summary>
        ///  提交通用服务工单
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<CreateGeneralServicesTicketResponse> CreateGeneralServicesTicket(CreateGeneralServicesTicketRequest request) {
            return await new CreateGeneralServicesTicketExecutor().Client(this).Execute<CreateGeneralServicesTicketResponse, CreateGeneralServicesTicketResult, CreateGeneralServicesTicketRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  查询机柜列表
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public DescribeCabinetsResponse DescribeCabinets(DescribeCabinetsRequest request) {
            return  new DescribeCabinetsExecutor().Client(this).Execute<DescribeCabinetsResponse, DescribeCabinetsResult, DescribeCabinetsRequest>(request);
        }
#else
        /// <summary>
        ///  查询机柜列表
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<DescribeCabinetsResponse> DescribeCabinets(DescribeCabinetsRequest request) {
            return await new DescribeCabinetsExecutor().Client(this).Execute<DescribeCabinetsResponse, DescribeCabinetsResult, DescribeCabinetsRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  查询开放设备列表
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public DescribeOpenDevicesResponse DescribeOpenDevices(DescribeOpenDevicesRequest request) {
            return  new DescribeOpenDevicesExecutor().Client(this).Execute<DescribeOpenDevicesResponse, DescribeOpenDevicesResult, DescribeOpenDevicesRequest>(request);
        }
#else
        /// <summary>
        ///  查询开放设备列表
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<DescribeOpenDevicesResponse> DescribeOpenDevices(DescribeOpenDevicesRequest request) {
            return await new DescribeOpenDevicesExecutor().Client(this).Execute<DescribeOpenDevicesResponse, DescribeOpenDevicesResult, DescribeOpenDevicesRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  查看某资源单个监控项数据
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public DescribeMetricDataResponse DescribeMetricData(DescribeMetricDataRequest request) {
            return  new DescribeMetricDataExecutor().Client(this).Execute<DescribeMetricDataResponse, DescribeMetricDataResult, DescribeMetricDataRequest>(request);
        }
#else
        /// <summary>
        ///  查看某资源单个监控项数据
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<DescribeMetricDataResponse> DescribeMetricData(DescribeMetricDataRequest request) {
            return await new DescribeMetricDataExecutor().Client(this).Execute<DescribeMetricDataResponse, DescribeMetricDataResult, DescribeMetricDataRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  查询工单详情
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public DescribeTicketResponse DescribeTicket(DescribeTicketRequest request) {
            return  new DescribeTicketExecutor().Client(this).Execute<DescribeTicketResponse, DescribeTicketResult, DescribeTicketRequest>(request);
        }
#else
        /// <summary>
        ///  查询工单详情
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<DescribeTicketResponse> DescribeTicket(DescribeTicketRequest request) {
            return await new DescribeTicketExecutor().Client(this).Execute<DescribeTicketResponse, DescribeTicketResult, DescribeTicketRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  查看某资源的最后一个监控数据点（目前只支持机柜电流）
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public LastDownsampleResponse LastDownsample(LastDownsampleRequest request) {
            return  new LastDownsampleExecutor().Client(this).Execute<LastDownsampleResponse, LastDownsampleResult, LastDownsampleRequest>(request);
        }
#else
        /// <summary>
        ///  查看某资源的最后一个监控数据点（目前只支持机柜电流）
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<LastDownsampleResponse> LastDownsample(LastDownsampleRequest request) {
            return await new LastDownsampleExecutor().Client(this).Execute<LastDownsampleResponse, LastDownsampleResult, LastDownsampleRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  查询机房房间号列表
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public DescribeRoomsResponse DescribeRooms(DescribeRoomsRequest request) {
            return  new DescribeRoomsExecutor().Client(this).Execute<DescribeRoomsResponse, DescribeRoomsResult, DescribeRoomsRequest>(request);
        }
#else
        /// <summary>
        ///  查询机房房间号列表
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<DescribeRoomsResponse> DescribeRooms(DescribeRoomsRequest request) {
            return await new DescribeRoomsExecutor().Client(this).Execute<DescribeRoomsResponse, DescribeRoomsResult, DescribeRoomsRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  查询带宽（出口）流量（资源）详情
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public DescribeBandwidthTrafficResponse DescribeBandwidthTraffic(DescribeBandwidthTrafficRequest request) {
            return  new DescribeBandwidthTrafficExecutor().Client(this).Execute<DescribeBandwidthTrafficResponse, DescribeBandwidthTrafficResult, DescribeBandwidthTrafficRequest>(request);
        }
#else
        /// <summary>
        ///  查询带宽（出口）流量（资源）详情
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<DescribeBandwidthTrafficResponse> DescribeBandwidthTraffic(DescribeBandwidthTrafficRequest request) {
            return await new DescribeBandwidthTrafficExecutor().Client(this).Execute<DescribeBandwidthTrafficResponse, DescribeBandwidthTrafficResult, DescribeBandwidthTrafficRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  查询设备详情
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public DescribeDeviceResponse DescribeDevice(DescribeDeviceRequest request) {
            return  new DescribeDeviceExecutor().Client(this).Execute<DescribeDeviceResponse, DescribeDeviceResult, DescribeDeviceRequest>(request);
        }
#else
        /// <summary>
        ///  查询设备详情
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<DescribeDeviceResponse> DescribeDevice(DescribeDeviceRequest request) {
            return await new DescribeDeviceExecutor().Client(this).Execute<DescribeDeviceResponse, DescribeDeviceResult, DescribeDeviceRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  查询带宽（出口）流量列表
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public DescribeBandwidthTrafficsResponse DescribeBandwidthTraffics(DescribeBandwidthTrafficsRequest request) {
            return  new DescribeBandwidthTrafficsExecutor().Client(this).Execute<DescribeBandwidthTrafficsResponse, DescribeBandwidthTrafficsResult, DescribeBandwidthTrafficsRequest>(request);
        }
#else
        /// <summary>
        ///  查询带宽（出口）流量列表
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<DescribeBandwidthTrafficsResponse> DescribeBandwidthTraffics(DescribeBandwidthTrafficsRequest request) {
            return await new DescribeBandwidthTrafficsExecutor().Client(this).Execute<DescribeBandwidthTrafficsResponse, DescribeBandwidthTrafficsResult, DescribeBandwidthTrafficsRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  查询报警规则列表
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public DescribeAlarmsResponse DescribeAlarms(DescribeAlarmsRequest request) {
            return  new DescribeAlarmsExecutor().Client(this).Execute<DescribeAlarmsResponse, DescribeAlarmsResult, DescribeAlarmsRequest>(request);
        }
#else
        /// <summary>
        ///  查询报警规则列表
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<DescribeAlarmsResponse> DescribeAlarms(DescribeAlarmsRequest request) {
            return await new DescribeAlarmsExecutor().Client(this).Execute<DescribeAlarmsResponse, DescribeAlarmsResult, DescribeAlarmsRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  查询带宽（出口）列表
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public DescribeBandwidthsResponse DescribeBandwidths(DescribeBandwidthsRequest request) {
            return  new DescribeBandwidthsExecutor().Client(this).Execute<DescribeBandwidthsResponse, DescribeBandwidthsResult, DescribeBandwidthsRequest>(request);
        }
#else
        /// <summary>
        ///  查询带宽（出口）列表
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<DescribeBandwidthsResponse> DescribeBandwidths(DescribeBandwidthsRequest request) {
            return await new DescribeBandwidthsExecutor().Client(this).Execute<DescribeBandwidthsResponse, DescribeBandwidthsResult, DescribeBandwidthsRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  查询设备列表
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public DescribeDevicesResponse DescribeDevices(DescribeDevicesRequest request) {
            return  new DescribeDevicesExecutor().Client(this).Execute<DescribeDevicesResponse, DescribeDevicesResult, DescribeDevicesRequest>(request);
        }
#else
        /// <summary>
        ///  查询设备列表
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<DescribeDevicesResponse> DescribeDevices(DescribeDevicesRequest request) {
            return await new DescribeDevicesExecutor().Client(this).Execute<DescribeDevicesResponse, DescribeDevicesResult, DescribeDevicesRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  查询公网IP列表
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public DescribeIpsResponse DescribeIps(DescribeIpsRequest request) {
            return  new DescribeIpsExecutor().Client(this).Execute<DescribeIpsResponse, DescribeIpsResult, DescribeIpsRequest>(request);
        }
#else
        /// <summary>
        ///  查询公网IP列表
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<DescribeIpsResponse> DescribeIps(DescribeIpsRequest request) {
            return await new DescribeIpsExecutor().Client(this).Execute<DescribeIpsResponse, DescribeIpsResult, DescribeIpsRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  修改报警规则
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public UpdateAlarmResponse UpdateAlarm(UpdateAlarmRequest request) {
            return  new UpdateAlarmExecutor().Client(this).Execute<UpdateAlarmResponse, UpdateAlarmResult, UpdateAlarmRequest>(request);
        }
#else
        /// <summary>
        ///  修改报警规则
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<UpdateAlarmResponse> UpdateAlarm(UpdateAlarmRequest request) {
            return await new UpdateAlarmExecutor().Client(this).Execute<UpdateAlarmResponse, UpdateAlarmResult, UpdateAlarmRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  查询可用监控项列表
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public DescribeMetricsResponse DescribeMetrics(DescribeMetricsRequest request) {
            return  new DescribeMetricsExecutor().Client(this).Execute<DescribeMetricsResponse, DescribeMetricsResult, DescribeMetricsRequest>(request);
        }
#else
        /// <summary>
        ///  查询可用监控项列表
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<DescribeMetricsResponse> DescribeMetrics(DescribeMetricsRequest request) {
            return await new DescribeMetricsExecutor().Client(this).Execute<DescribeMetricsResponse, DescribeMetricsResult, DescribeMetricsRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  根据IP网段查询流量采样数据
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public DescribeTrafficSamplingResponse DescribeTrafficSampling(DescribeTrafficSamplingRequest request) {
            return  new DescribeTrafficSamplingExecutor().Client(this).Execute<DescribeTrafficSamplingResponse, DescribeTrafficSamplingResult, DescribeTrafficSamplingRequest>(request);
        }
#else
        /// <summary>
        ///  根据IP网段查询流量采样数据
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<DescribeTrafficSamplingResponse> DescribeTrafficSampling(DescribeTrafficSamplingRequest request) {
            return await new DescribeTrafficSamplingExecutor().Client(this).Execute<DescribeTrafficSamplingResponse, DescribeTrafficSamplingResult, DescribeTrafficSamplingRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  查询机柜详情
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public DescribeCabinetResponse DescribeCabinet(DescribeCabinetRequest request) {
            return  new DescribeCabinetExecutor().Client(this).Execute<DescribeCabinetResponse, DescribeCabinetResult, DescribeCabinetRequest>(request);
        }
#else
        /// <summary>
        ///  查询机柜详情
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<DescribeCabinetResponse> DescribeCabinet(DescribeCabinetRequest request) {
            return await new DescribeCabinetExecutor().Client(this).Execute<DescribeCabinetResponse, DescribeCabinetResult, DescribeCabinetRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  查询机房资源概览
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public DescribeIdcOverviewResponse DescribeIdcOverview(DescribeIdcOverviewRequest request) {
            return  new DescribeIdcOverviewExecutor().Client(this).Execute<DescribeIdcOverviewResponse, DescribeIdcOverviewResult, DescribeIdcOverviewRequest>(request);
        }
#else
        /// <summary>
        ///  查询机房资源概览
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<DescribeIdcOverviewResponse> DescribeIdcOverview(DescribeIdcOverviewRequest request) {
            return await new DescribeIdcOverviewExecutor().Client(this).Execute<DescribeIdcOverviewResponse, DescribeIdcOverviewResult, DescribeIdcOverviewRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  查询报警规则详情
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public DescribeAlarmResponse DescribeAlarm(DescribeAlarmRequest request) {
            return  new DescribeAlarmExecutor().Client(this).Execute<DescribeAlarmResponse, DescribeAlarmResult, DescribeAlarmRequest>(request);
        }
#else
        /// <summary>
        ///  查询报警规则详情
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<DescribeAlarmResponse> DescribeAlarm(DescribeAlarmRequest request) {
            return await new DescribeAlarmExecutor().Client(this).Execute<DescribeAlarmResponse, DescribeAlarmResult, DescribeAlarmRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  删除报警
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public DeleteAlarmResponse DeleteAlarm(DeleteAlarmRequest request) {
            return  new DeleteAlarmExecutor().Client(this).Execute<DeleteAlarmResponse, DeleteAlarmResult, DeleteAlarmRequest>(request);
        }
#else
        /// <summary>
        ///  删除报警
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<DeleteAlarmResponse> DeleteAlarm(DeleteAlarmRequest request) {
            return await new DeleteAlarmExecutor().Client(this).Execute<DeleteAlarmResponse, DeleteAlarmResult, DeleteAlarmRequest>(request).ConfigureAwait(false);
        }
#endif

            /// <summary>
            ///  默认JdccsClient 构造器 接口
            ///</summary>
            public interface Builder
            {

                /// <summary>
                /// 设置认证信息参数
                /// </summary>
                /// <param name="provider">认证信息提供对象</param>
                /// <returns>jdccsClient 构造器</returns>
                Builder CredentialsProvider(CredentialsProvider provider);

                /// <summary>
                /// 设置请求环境参数
                /// </summary>
                /// <param name="environment">环境参数信息</param>
                /// <returns>jdccsClient 构造器</returns>
                Builder Environment(Core.Client.SDKEnvironment environment);

                /// <summary>
                /// http 请求配置信息
                /// </summary>
                /// <param name="config">http 请求配置信息</param>
                /// <returns>jdccsClient 构造器</returns>
                Builder HttpRequestConfig(HttpRequestConfig config);

                /// <summary>
                ///  构造JdccsClient 对象
                ///</summary>
                JdccsClient Build();
            }

            /// <summary>
            ///  默认JdccsClient 构造器
            ///</summary>
            public class DefaultBuilder : Builder
            {
                /// <summary>
                ///  JdccsClient service client
                /// </summary>
                private  JdccsClient jdccsClient;

                /// <summary>
                ///  默认JdccsClient 构造器构造对象
                ///</summary>
                public DefaultBuilder()
                {
                    jdccsClient = new JdccsClient();
                }

                /// <summary>
                ///  构造JdccsClient 对象
                ///</summary>
                public JdccsClient Build()
                {
                    if (jdccsClient.CredentialsProvider == null)
                    {
                        //if credentialsProvider not set, try load jdcloud global default  credentials provider
                        jdccsClient.credentialsProvider = JdCloud.DefaultInstance.GetCredentialsProvider();
                        if (jdccsClient.credentialsProvider == null)
                        {
                            throw new ArgumentNullException("JdccsClient build error: jdcloud credentials provider not set");
                        }
                    }
                    if (jdccsClient.HttpRequestConfig == null)
                    {
                        jdccsClient.httpRequestConfig = JdCloud.DefaultInstance.GetHttpRequestConfig();
                        if (jdccsClient.httpRequestConfig == null)
                        {
                        throw new ArgumentNullException("JdccsClient build error: http request config not set");
                        }
                    }
                    return jdccsClient;
                }

                /// <summary>
                /// 设置认证信息参数
                /// </summary>
                /// <param name="provider">认证信息提供对象</param>
                /// <returns>jdccsClient 构造器</returns>
                public Builder CredentialsProvider(CredentialsProvider provider)
                {
                    jdccsClient.credentialsProvider = provider;
                    return this;
                }

                /// <summary>
                /// 设置请求环境参数
                /// </summary>
                /// <param name="environment">环境参数信息</param>
                /// <returns>jdccsClient 构造器</returns>
                public Builder Environment(SDKEnvironment environment)
                {
                    jdccsClient.environment = environment;
                    return this;
                }

                /// <summary>
                /// http 请求配置信息
                /// </summary>
                /// <param name="config">http 请求配置信息</param>
                /// <returns>jdccsClient 构造器</returns>
                public Builder HttpRequestConfig(HttpRequestConfig config)
                {
                    jdccsClient.httpRequestConfig = config;
                    return this;
                }
            }
    }
}
